package com.jinhongone.pattern.creater.factory.simple;

public class CoffeeStore {

    public Coffee orderCoffee(String type) {
          // 使用实例工厂
//        SimpleFactory simpleFactory = new SimpleFactory();
//        Coffee coffee = simpleFactory.createCoffee(type);

//      使用静态工厂
        Coffee coffee = SimpleFactory.createCoffee(type);
        coffee.addSugar();
        coffee.addMilk();
        return coffee;
    }
}
